import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);


import moment from 'moment'
// 然后写全局过滤器
Vue.filter('dataFormat', function (time, format) {
  // 格式化时间， 拿到时间
  if (time) {
    return moment(time).format(format)
  }
})


import axios from 'axios'
import VueAxios from 'vue-axios'
axios.defaults.baseURL = "http://localhost:3000"
Vue.use(VueAxios, axios)




Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
